<div class="container" id="nguoi_dung_profile">
	<div class="row">
		<div class="span12 text-center">
			<h1><%= t 'lich_su_mua_hang'%></h1>
			<% if flash.now[:loi].present? %>
			<p class="alert alert-error">
				<%= flash.now[:loi]%>
			</p>
			<% end %>
			<% if flash.now[:thanh_cong].present? %>
			<p class="alert alert-success">
				<%= flash.now[:thanh_cong]%>
			</p>
			<% end %>
		</div>
	</div>
	<div class="row">
		<div class="span4 body_section">
			<img class="img-rounded body_section_image" src="<%= gravatar_url(@nguoi_dung.email, 200)%>" />
		</div>
		<div class="span8">
			<table class="table table-bordered">
				<% i = @index_dau_tien + 1%>
				<tr>
					<th>#</th>
					<th><%= t 'ngay_mua'%></th>
					<th><%= t 'gia_tri'%></th>
					<th><%= t 'trang_thai'%></th>
					<th><%= t 'chi_tiet'%></th>
				</tr>
				<% for gh in @gio_hangs %>
				<tr>
					<th><%= i%><% i += 1%></th>
					<td><%= gh.updated_at.strftime('%Y-%m-%d %H:%M:%S')%></td>
					<td><%= number_with_delimiter gh.tong_gia_tri, :delimiter => " "%> <span class="tien_te">VND</span></td>
					<td> <% if gh.da_xu_ly %> <span class="label label-success"><%= t 'da_xu_ly'%></span> <% else %> <span><%= t 'dang_cho'%></span> <% end %> </td>
					<td><a href="<%= url_for :controller => 'gio_hang', :action=> 'index', :gio_hang_id => gh.id%>"><%= t 'chi_tiet'%></a></td>
				</tr>
				<% end %>
			</table>
		</div>
	</div>
</div>

<div>
	<%= render "shared/goi_y_caphe" %>
</div>
